package com.two.shopping.controller;

import com.two.shopping.pojo.Orders;
import com.two.shopping.pojo.Result;
import com.two.shopping.service.IAppraiseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class AppraiseController {
    @Autowired
    IAppraiseService appraiseService;
    @CrossOrigin
    @PostMapping("/orders")
    private Result appraiseCommodity(@RequestBody Orders orders) {
        log.info("order是{}",orders);
        appraiseService.appraiseCommodity(orders);
        return Result.success("成功评价");
    }

}
